
#ifndef _Demo_CameraController_H_
#define _Demo_CameraController_H_

#include "OgrePrerequisites.h"
#include "GameStateMain.h"
#include <OgreVector3.h>
#include <QtCore/QPoint>

namespace OgreModel
{
    class CameraController
    {
#if OGRE_USE_SDL2

        bool                mUseSceneNode;

        bool                mSpeedMofifier;
        bool                mWASD[4];
        bool                mSlideUpDown[2];
        float               m_fAngleLook;
        float               m_fAngleUp;
        public: float       mCameraBaseSpeed;
        public: float       mCameraSpeedBoost;

    private:
        GraphicsSystem      *mGraphicsSystem;
#else
		bool                mUseSceneNode;
		float				m_fSpeed;
		float				m_TimeLast, m_TimeLastBefore;
		Ogre::Vector3		m_vMoveRelValue, m_vMoveABSValue;
		/* bool                mSpeedMofifier;
		bool                mWASD[4];
		bool                mSlideUpDown[2];*/
		float               m_fAngleLook;
		float               m_fAngleUp;

		GraphicsSystem      *m_pGraphicsSystem;
		QPoint	m_pntBefore;
		bool					m_isNeedRotate;
		bool					m_isNeedMove;
#endif

    public:
        CameraController( GraphicsSystem *graphicsSystem, bool useSceneNode=false );
#if OGRE_USE_SDL2
        void update( float timeSinceLast );

        /// Returns true if we've handled the event
        bool keyPressed( const SDL_KeyboardEvent &arg );
        /// Returns true if we've handled the event
        bool keyReleased( const SDL_KeyboardEvent &arg );

        void mouseMoved( const SDL_Event &arg );
#else
		void update(float timeSinceLast);
		/// Returns true if we've handled the event
		bool VKKeybordPressed(const std::map<int, bool> & vk_Key);
		bool VKMousePressed(const std::map<int, bool> & vk_Key);
	private:
#endif
    };
}

#endif
